package com.dormitory.javadormitory.service.impl;

import com.dormitory.javadormitory.entity.Student;
import com.dormitory.javadormitory.mapper.UserInfoMapper;
import com.dormitory.javadormitory.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Override
    public ArrayList<Student> arr() {
        return userInfoMapper.arr();
    }

    @Override
    public void insertVerify(Student student) {
        userInfoMapper.insertVerify(student);
    }

    @Override
    public Student updateById(int id) {
        return userInfoMapper.updateById(id);
    }

    @Override
    public void updateStudent(Student student) {
        userInfoMapper.updateStudent(student);
    }

    @Override
    public void studentDeleteD(int id) {
        userInfoMapper.studentDeleteD(id);
    }

    @Override
    public ArrayList<Student> onSubmitName(String name) {
        return userInfoMapper.onSubmitName(name);
    }

    @Override
    public ArrayList<Student> onSubmitBunkhouseName(String bunkhouseName) {

        return userInfoMapper.onSubmitBunkhouseName(bunkhouseName);
    }
}
